package TemplateMethodCode.ConcreteAccount;

import TemplateMethodCode.AbstractAccount;

public class CurrentAccount extends AbstractAccount {

    static double interestRate = 0.012;

    public CurrentAccount(double money, double year) {
        super(money, year);
    }

    @Override
    protected String getAccountType() {
        return "活期账户";
    }

    @Override
    protected double computeInterest() {
        return Math.pow(1+interestRate,super.year)*super.money-super.money;
    }
}

